<?php 
include '../function.php';
$link = @new mysqli("localhost","root","","school");

if($link->connect_errno){
	echo "链接失败：代码".$link->connect_errno.',错误信息：'.$link->connect_error;
	die;
};

// 设置编码
$link->query("SET NAMES 'utf8'");

$id = $_GET['id'];

// 组合sql
$sql ="select * from  stu where id= 3 or 1=1";


// 执行sql
$result = $link->query($sql);

// 空数组
$tempArr = array();

// 循环取数
while ($row = $result->fetch_assoc()) {
	$tempArr[]= $row;
}

// var_dump($link->affected_rows);
var_dump($tempArr);







 ?>